package com.ysd.lis.controller.bac;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.bac.BacReqPurposeFeeItem;
import com.ysd.lis.request.bac.PurposeDto;
import com.ysd.lis.request.bac.PurposeItemParam;
import com.ysd.lis.service.bac.BacReqPurposeFeeItemService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-04-11
 */
@RestController
@RequestMapping("/api/bac/bacReqPurposeFeeItem")
public class BacReqPurposeFeeItemController extends BaseController {

    @Autowired
    BacReqPurposeFeeItemService bacReqPurposeFeeItemService;
    @ApiOperation("查询")
    @GetMapping("/findPurposeFeeItemList")
    public Result findPurposeFeeItemList(PurposeItemParam param){
        return bacReqPurposeFeeItemService.findPurposeFeeItemList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addPurposeFeeItem")
    public Result addPurposeFeeItem(@RequestBody BacReqPurposeFeeItem bacReqPurposeFeeItem){
        return  bacReqPurposeFeeItemService.addPurposeFeeItem(bacReqPurposeFeeItem);
    }
    @ApiOperation("批量删除")
    @PostMapping("/batchDeletePurposeItemList")
    public Result batchDeletePurposeItemList(@RequestBody PurposeDto dto){
        return  bacReqPurposeFeeItemService.batchDeletePurposeItemList(dto);
    }
    @ApiOperation("根据详情id删除详情数据")
    @PostMapping("/deletePurposeFeeItem")
    public Result deletePurposeFeeItem(@RequestBody BacReqPurposeFeeItem bacReqPurposeFeeItem) {
        return bacReqPurposeFeeItemService.deletePurposeFeeItem(bacReqPurposeFeeItem);
    }
}
